<!doctype html>
<script src="../../resources/js-test.js"></script>
<script>
description('Tests that fontFace.load() promise is resolved when fontface object is unreachable from JS');

window.jsTestIsAsync = true;

var fontFace = new FontFace('ahem', 'url(../../resources/Ahem.ttf)');
document.fonts.add(fontFace);
fontFace.load().then(function() {
    debug("PASS load() promise resolved");
    finishJSTest();
});
fontFace = undefined;
gc();
</script>
